package com.workManager.actListener;

import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;
import org.apache.log4j.Logger;

import java.util.Map;
import java.util.Set;

/**
 * Created by Thinkpad on 2017/2/15 0015.
 *
 */
public class DeveloperKnowledgeExamListener implements JavaDelegate{


    private Logger logger = Logger.getLogger(DeveloperKnowledgeExamListener.class.getName());


    public void execute(DelegateExecution delegateExecution) throws Exception {

      logger.info("开始开发面试知识---------------");
        Map<String,Object> variables = delegateExecution.getVariables();
        Set<Map.Entry<String,Object>> infos = variables.entrySet();
        for(Map.Entry<String,Object> entry : infos){
            logger.info(entry.getKey()+" "+entry.getValue());
        }
        //Thread.sleep(60000);
        logger.info("开始开发面试知识.....");
        delegateExecution.setVariable("result","开发面试知识通过了......");

    }
}
